{% extends 'layout.html' %}

{% block css %}

    <style>
        .guige {
            margin: 20px;
        }

        .guige-table {
            width: 100%;
            border-collapse: collapse;
            border-spacing: 0;
        }

        .guige-table .title {
            background: #f5fafe;
            text-align: left;
            font-weight: bold;
            line-height: 32px;
            height: 32px;
            font-family: "微软雅黑";
        }

        .guige-table td, .content .guige-table th {
            border: 1px solid #dcdcdc;
            line-height: 30px;
            height: 30px;
            padding: 0 10px;
        }

        .guige-table .body-left {
            width: 126px;
            font-weight: normal;
            text-align: right;
            color: #666;
        }

        .guige-table .body-right {
            color: #333;
        }
    </style>
{% endblock %}

{% block content %}

    <div class="guige">
        <table class="guige-table">
            <tbody>

            <tr>
                <th colspan="5" class="title f14" style="border-left:2px solid #0488cd;">&nbsp;基本信息</th>
            </tr>
            <tr>
                <td>主机名</td>
                <td>cpu型号</td>
                <td>制造商</td>
                <td colspan="2">sn号</td>
            </tr>
             <tr>
                <td>{{ server.hostname }}</td>
                <td>{{ server.cpu_model }}</td>
                <td>{{ server.manufacturer }}</td>
                <td colspan="2">{{ server.sn }}</td>
            </tr>


            <tr>
                <th colspan="5" class="title f14" style="border-left:2px solid #0488cd;">&nbsp;网卡信息</th>
            </tr>
            <tr>
                <td>名称</td>
                <td>MAC地址</td>
                <td>IP地址</td>
                <td colspan="2">掩码</td>
            </tr>

            {% for nic in all_nics %}
                <tr>
                    <td>{{ nic.name }}</td>
                    <td>{{ nic.hwaddr }}</td>
                    <td>{{ nic.ipaddrs }}</td>
                    <td colspan="2">{{ nic.netmask }}</td>
                </tr>
            {% endfor %}

            <tr>
                <th colspan="5" class="title f14" style="border-left:2px solid #0488cd;">
                    <span>&nbsp;内存信息</span>
                </th>
            </tr>
            <tr>
                <td>插槽</td>
                <td>容量</td>
                <td>型号</td>
                <td colspan="2">制造商</td>
            </tr>

            {% for memory in all_memories %}
                <tr>
                    <td>{{ memory.slot }}</td>
                    <td>{{ memory.capacity }}</td>
                    <td>{{ memory.model }}</td>
                    <td colspan="2">{{ memory.manufacturer }}</td>
                </tr>
            {% endfor %}



            <tr>
                <th colspan="5" class="title f14" style="border-left:2px solid #0488cd;">
                    <span>&nbsp;硬盘信息</span>
                </th>
            </tr>
            <tr>
                <td>插槽</td>
                <td>容量</td>
                <td>接口类型</td>
                <td>型号</td>
            </tr>

            {% for disk in all_disks %}
                <tr>
                    <td>{{ disk.slot }}</td>
                    <td>{{ disk.capacity }}</td>
                    <td>{{ disk.pd_type }}</td>
                    <td>{{ disk.model }}</td>

                </tr>
            {% endfor %}


            {#            <tr>#}
            {#                <th colspan="5" class="title f14" style="border-left:2px solid #0488cd;">RAID适配器信息</th>#}
            {#            </tr>#}
            {#            <tr>#}
            {#                <td colspan="2">名称</td>#}
            {#                <td colspan="3">型号</td>#}
            {#            </tr>#}

            </tbody>
        </table>
    </div>

{% endblock %}